<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>求最大值</title>
		<script>
		function max(arr){
			var max=arr[0];
			for(var i=0;i<arr.length;i++){
				if(arr[i]>max){
					max=arr[i];
				}
			}
			return max;
		}
		
		console.log(max([5,7,9,32,15,1,90,22]))</script>
	</head>
	<body>
		<h1>数组求和</h1>
	</body>
</html>
